﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using HP.Cachalote.DataModels;
using HP.Cachalote.Services.Interfaces;

namespace HP.Cachalote.WPF.Design
{
    public class DesignLabelService : ITodoLabelService
    {
        public object Add(TodoLabel entity)
        {
            throw new NotImplementedException();
        }

        public object Insert(TodoLabel todoLabel)
        {
            throw new NotImplementedException();
        }

        public TodoLabel Get(object id)
        {
            throw new NotImplementedException();
        }

        public IList<TodoLabel> Filter(Expression<Func<TodoLabel, bool>> expression)
        {
            return GetAll();
        }

        public IList<TodoLabel> GetAll()
        {
            var result = new List<TodoLabel>();

            result.Add(new TodoLabel
            {
                ID = 1,
                Name = "Label 01",
                Parent = null,
                Icon = string.Empty,
                TodoItems = null,
                OrderIndex = 1
            });

            result[0].SubLabels.Add(new TodoLabel
            {
                ID = 4,
                Name = "Label 01 - 01",
                Parent = result[0],
                Icon = string.Empty,
                TodoItems = null,
                OrderIndex = 1
            });

            result[0].SubLabels.Add(new TodoLabel
            {
                ID = 5,
                Name = "Label 01 - 02",
                Parent = result[0],
                Icon = string.Empty,
                TodoItems = null,
                OrderIndex = 2
            });

            result.Add(new TodoLabel
            {
                ID = 2,
                Name = "Label 02",
                Parent = null,
                Icon = string.Empty,
                TodoItems = null,
                OrderIndex = 2
            });

            result.Add(new TodoLabel
            {
                ID = 3,
                Name = "Label 03",
                Parent = null,
                Icon = string.Empty,
                TodoItems = null,
                OrderIndex = 3
            });

            return result;
        }

        public int GetRowCount(Expression<Func<TodoLabel, bool>> expression)
        {
            throw new NotImplementedException();
        }

        public void Update(TodoLabel entity)
        {
            throw new NotImplementedException();
        }

        public void AddOrUpdate(TodoLabel entity)
        {
            throw new NotImplementedException();
        }

        public void Delete(TodoLabel entity)
        {
            throw new NotImplementedException();
        }

        //public IList<TodoLabel> GetHierarchicalLabelList()
        //{
        //    return GetAll();
        //}
    }
}
